import { Toast } from 'mint-ui'
let toast
export function message (msg, type) {
  toast && toast.close && toast.close()
  toast = Toast({
    message: msg,
    position: 'top',
    duration: 1000,
    iconClass: type ? 'icon icon-success' : ''
  })
}
